<%@ page import="com.onlineOrder.bean.menuList" %>
<%@ page import="java.util.List" %>
<%@ page import="com.onlineOrder.webAction.shopServlet" %><%--
  Created by IntelliJ IDEA.
  User: 12296
  Date: 2022/3/9
  Time: 10:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商家菜品管理</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" >
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" >
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" ></script>
    <link rel="stylesheet" href="./style/index.css">
    <link rel="stylesheet" href="./style/dialog.css">

    <style>
        button{
            position: absolute;
            right: 200px;
            top: 3px;
        }
    </style>

</head>
<body>
<div class="container row=10">
    <button onclick="location.href='<%=request.getContextPath()%>/shopMenuAdd.jsp'" class="btn btn-success">添加菜品</button>
<table class="table table-striped table-hover">
    <tbody>
    <tr>
        <th>      </th>
        <th>菜品名称</th>
        <th>菜品价格</th>
        <th>供 餐 方</th>
    </tr>

<%
    List<menuList> menuLists = (List<menuList>)request.getAttribute("shopMenuManage");
    //循环遍历
    int i=0;
    for (menuList menuList:menuLists){


%>

    <tr>
        <td><%=++i%></td>
        <td><%=menuList.getMenus()%></td>
        <td><%=menuList.getPrice()%></td>
        <td><%=menuList.getShopName()%></td>
    </tr>
<%
    }
%>
    </tbody>
</table>
</div>

</body>
</html>
